package br.com.dev.tcc.bean;

public enum PlanoEnum {

	OURO("Ouro", 1), PRATA("Prata", 2), BRONZE("Bronze", 3);

	PlanoEnum(String d, int id) {
		descricao = d;
		this.id = id;
	}

	private int id;
	private String descricao;

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public static String getDescricao(int id){
		
		String desc = "";
		
		for(PlanoEnum p : values()){
			if(p.getId() == id)
				desc = p.getDescricao();
		}
		
		return desc;
	}
}
